package calendar;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

public class CalendarController {

	CalendarMyba dao;

	public CalendarMyba getDao() {
		return dao;
	}
	public void setDao(CalendarMyba dao) {
		this.dao = dao;
	}
	
	/*@RequestMapping(value="/select.cal", method=RequestMethod.POST)
	public ModelAndView select(){
		ModelAndView mav = new ModelAndView();
		
		mav.setViewName("");
		return mav;
	}
	
	@RequestMapping(value="/CalInsertForm.cal", method=RequestMethod.GET)
	public ModelAndView insertForm(CalendarVo cv){
		System.out.println("들어옴?");
		ModelAndView mav = new ModelAndView();
		mav.setViewName("/homepage/index.jsp?inc_content=./calendar/calendar_write.jsp");
		return mav;
	}
	
	@RequestMapping(value="/insertOK.cal", method=RequestMethod.POST)
	public ModelAndView insertOK(CalendarVo cv){
		ModelAndView mav = new ModelAndView();
		dao.setCv(cv);
		dao.insert();
		mav.setViewName("");
		return mav;
	}
	
	@RequestMapping(value="/view.cal", method=RequestMethod.POST)
	public ModelAndView view(CalendarVo cv){
		ModelAndView mav = new ModelAndView();
		dao.setCv(cv);
		dao.view();
		mav.setViewName("");
		return mav;
	}
	
	@RequestMapping(value="/update.cal", method=RequestMethod.POST)
	public ModelAndView update(CalendarVo cv){
		ModelAndView mav = new ModelAndView();
		dao.setCv(cv);
		dao.update();
		mav.setViewName("");
		return mav;
	}
	
	@RequestMapping(value="/delete.cal", method=RequestMethod.POST)
	public ModelAndView delete(CalendarVo cv){
		ModelAndView mav = new ModelAndView();
		dao.setCv(cv);
		dao.delete();
		mav.setViewName("");
		return mav;
	}*/
	
	
}
